<?php
	include("protect2.php");
?>

<STYLE type=text/css>.blank {
	FONT-SIZE: 0px; WIDTH: 0px; HEIGHT: 0px
}
TD {
	FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
INPUT {
	FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.present {
	FONT-WEIGHT: bold; BACKGROUND-COLOR: #dee5ec
}
.h1 {
	FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #ffffff
}
.d1 {
	COLOR: #c0c0c0
}
.link {
	FONT-WEIGHT: bold; FONT-SIZE: 12px; CURSOR: hand; COLOR: #ffffff; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.footer {
	FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.footer1 {
	FONT-WEIGHT: bold; FONT-SIZE: 10px; BACKGROUND-IMAGE: url(chat/images/menu_b.gif); CURSOR: default; COLOR: #000000; BORDER-BOTTOM: 0px
}
.header {
	FONT-WEIGHT: bold; FONT-SIZE: 10px; BACKGROUND-IMAGE: url(chat/images/menu_h.gif); CURSOR: default; COLOR: #000000; BORDER-BOTTOM: 0px
}
.textcol {
	FONT-SIZE: 12px; COLOR: #2378d5; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
</STYLE>

<?php
    $sel_smt=$_POST["sel_sesi"];
	$sel_periode=$_POST["sel_periode"];
	include("header_admin.html");
	include("connect.php");
	$pilih=mysql_select_db("uwika_krs",$conn);
	echo "<BR>";
	echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Berikut dibawah ini adalah daftar mahasiswa yang " . "<B>" . " sudah valid " . "</B>" . " KRS-nya pada :";
	echo "<br>";
	echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Semester : " . $sel_smt;
	echo "<br>";
	echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Periode &nbsp&nbsp : " . $sel_periode;
	
	echo "<br><BR>";
	echo "<table width=\"100%\" border=\"0\">";
	echo "<table align=center width=\"700\" border=\"1\">";
	echo "<tr>";
	echo "<td width=\"50\"><center>N R P</center></td>";
	echo "<td width=\"200\"><center>N A M A &nbsp; M A H A S I S W A </center></td>";
	echo "<td width=\"25\"><center>S K S</center></td>";
	echo "</tr>";

	$sqlstr="select registrasi.nrp, biodata.nama, sum(sks) from registrasi,biodata where registrasi.nrp=biodata.nrp and biodata.dosenwali='$reg_uname' and registrasi.validasi=1 group by registrasi.nrp";
	$hasil=mysql_query($sqlstr);
	$row = mysql_fetch_row($hasil);
	do {
		list($nrp,$nama,$sks) = $row;
		if (empty($nrp)) {
		echo "<BR>";
		break;
		} 
		echo "<tr><td width=\"50\"><center><a href=\"givevalid.php?nrp=$nrp&sesi=$sel_sesi&periode=$sel_periode\"> $nrp </center></td>";
		echo "<td width=\"200\"> $nama </td>";
		echo "<td width=\"25\"><center> $sks </center></td>";
		echo "</tr>";
	} while ($row=mysql_fetch_row($hasil));
	echo "</table></table>";
	echo "<br><Br>";

	include("footer.php");
?>